/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.ajz.entity;

import com.fasterxml.jackson.annotation.JsonBackReference;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.thinkgem.jeesite.common.persistence.TreeEntity;

/**
 * 门店区域划分表Entity
 * @author whh
 * @version 2017-09-14
 */
public class AjzBaseinfo extends TreeEntity<AjzBaseinfo> {
	
	private static final long serialVersionUID = 1L;
	private AjzBaseinfo parent;		// parent_id
	private String parentIds;		// parent_ids
	private String enterpriseName;		// 单位名称
	private String chargePerson;		// 负责人姓名
	private String managerPerson;		// 经营者姓名
	private String post;		// 职务
	private String telephone;		// 电话
	private Date deadlineRectification;		// 整改截止时间
	private String investigationPersonId;		// 排查人员
	private String tableName;		// 表名
	private String recordId;		// 记录id
	private String addr;		// 地址
	private Integer sort;		// sort
	private String storeInfo;		// 店信息
	private String longitude;		// 经度
	private String backUpa;		// back_upa
	private String backUpb;		// back_upb
	private String dimension;		// 维度
	private String backUpc;		// 邮箱
	private String backUpd;		// back_upd
	private String backUpe;		// back_upe
	private String backUpf;		// back_upf
	private String backUpg;		// back_upg
	private String backUph;		// back_uph
	private String backUpi;		// back_upi
	private String backUpj;		// back_upj
	
	public AjzBaseinfo() {
		super();
	}

	public AjzBaseinfo(String id){
		super(id);
	}

	@JsonBackReference
	@NotNull(message="parent_id不能为空")
	public AjzBaseinfo getParent() {
		return parent;
	}

	public void setParent(AjzBaseinfo parent) {
		this.parent = parent;
	}
	
	@Length(min=1, max=2000, message="parent_ids长度必须介于 1 和 2000 之间")
	public String getParentIds() {
		return parentIds;
	}

	public void setParentIds(String parentIds) {
		this.parentIds = parentIds;
	}
	
	@Length(min=1, max=100, message="单位名称长度必须介于 1 和 100 之间")
	public String getEnterpriseName() {
		return enterpriseName;
	}

	public void setEnterpriseName(String enterpriseName) {
		this.enterpriseName = enterpriseName;
	}
	
	@Length(min=0, max=64, message="负责人姓名长度必须介于 0 和 64 之间")
	public String getChargePerson() {
		return chargePerson;
	}

	public void setChargePerson(String chargePerson) {
		this.chargePerson = chargePerson;
	}
	
	@Length(min=0, max=64, message="经营者姓名长度必须介于 0 和 64 之间")
	public String getManagerPerson() {
		return managerPerson;
	}

	public void setManagerPerson(String managerPerson) {
		this.managerPerson = managerPerson;
	}
	
	@Length(min=0, max=200, message="职务长度必须介于 0 和 200 之间")
	public String getPost() {
		return post;
	}

	public void setPost(String post) {
		this.post = post;
	}
	
	@Length(min=0, max=20, message="电话长度必须介于 0 和 20 之间")
	public String getTelephone() {
		return telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getDeadlineRectification() {
		return deadlineRectification;
	}

	public void setDeadlineRectification(Date deadlineRectification) {
		this.deadlineRectification = deadlineRectification;
	}
	
	@Length(min=0, max=64, message="排查人员长度必须介于 0 和 64 之间")
	public String getInvestigationPersonId() {
		return investigationPersonId;
	}

	public void setInvestigationPersonId(String investigationPersonId) {
		this.investigationPersonId = investigationPersonId;
	}
	
	@Length(min=0, max=2000, message="表名长度必须介于 0 和 2000 之间")
	public String getTableName() {
		return tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}
	
	@Length(min=0, max=64, message="记录id长度必须介于 0 和 64 之间")
	public String getRecordId() {
		return recordId;
	}

	public void setRecordId(String recordId) {
		this.recordId = recordId;
	}
	
	@Length(min=0, max=64, message="地址长度必须介于 0 和 64 之间")
	public String getAddr() {
		return addr;
	}

	public void setAddr(String addr) {
		this.addr = addr;
	}
	
	@NotNull(message="sort不能为空")
	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}
	
	@Length(min=0, max=255, message="店信息长度必须介于 0 和 255 之间")
	public String getStoreInfo() {
		return storeInfo;
	}

	public void setStoreInfo(String storeInfo) {
		this.storeInfo = storeInfo;
	}
	
	@Length(min=0, max=64, message="经度长度必须介于 0 和 64 之间")
	public String getLongitude() {
		return longitude;
	}

	public void setLongitude(String longitude) {
		this.longitude = longitude;
	}
	
	@Length(min=0, max=255, message="back_upa长度必须介于 0 和 255 之间")
	public String getBackUpa() {
		return backUpa;
	}

	public void setBackUpa(String backUpa) {
		this.backUpa = backUpa;
	}
	
	@Length(min=0, max=255, message="back_upb长度必须介于 0 和 255 之间")
	public String getBackUpb() {
		return backUpb;
	}

	public void setBackUpb(String backUpb) {
		this.backUpb = backUpb;
	}
	
	@Length(min=0, max=64, message="维度长度必须介于 0 和 64 之间")
	public String getDimension() {
		return dimension;
	}

	public void setDimension(String dimension) {
		this.dimension = dimension;
	}
	
	@Length(min=0, max=255, message="back_upc长度必须介于 0 和 255 之间")
	public String getBackUpc() {
		return backUpc;
	}

	public void setBackUpc(String backUpc) {
		this.backUpc = backUpc;
	}
	
	@Length(min=0, max=255, message="back_upd长度必须介于 0 和 255 之间")
	public String getBackUpd() {
		return backUpd;
	}

	public void setBackUpd(String backUpd) {
		this.backUpd = backUpd;
	}
	
	@Length(min=0, max=255, message="back_upe长度必须介于 0 和 255 之间")
	public String getBackUpe() {
		return backUpe;
	}

	public void setBackUpe(String backUpe) {
		this.backUpe = backUpe;
	}
	
	@Length(min=0, max=255, message="back_upf长度必须介于 0 和 255 之间")
	public String getBackUpf() {
		return backUpf;
	}

	public void setBackUpf(String backUpf) {
		this.backUpf = backUpf;
	}
	
	@Length(min=0, max=255, message="back_upg长度必须介于 0 和 255 之间")
	public String getBackUpg() {
		return backUpg;
	}

	public void setBackUpg(String backUpg) {
		this.backUpg = backUpg;
	}
	
	@Length(min=0, max=255, message="back_uph长度必须介于 0 和 255 之间")
	public String getBackUph() {
		return backUph;
	}

	public void setBackUph(String backUph) {
		this.backUph = backUph;
	}
	
	@Length(min=0, max=255, message="back_upi长度必须介于 0 和 255 之间")
	public String getBackUpi() {
		return backUpi;
	}

	public void setBackUpi(String backUpi) {
		this.backUpi = backUpi;
	}
	
	@Length(min=0, max=255, message="back_upj长度必须介于 0 和 255 之间")
	public String getBackUpj() {
		return backUpj;
	}

	public void setBackUpj(String backUpj) {
		this.backUpj = backUpj;
	}
	
	public String getParentId() {
		return parent != null && parent.getId() != null ? parent.getId() : "0";
	}
}